Skip to content

Respect .gitignore per workspace search root#52

Open
ryuszi wants to merge 1 commit into
zigcBenx:masterfrom
ryuszi:codex/issue-35-respect-gitignore
Open

Respect .gitignore per workspace search root#52
ryuszi wants to merge 1 commit into
zigcBenx:masterfrom
ryuszi:codex/issue-35-respect-gitignore

Conversation

@ryuszi

@ryuszi ryuszi commented Jun 10, 2026

Copy link
Copy Markdown

Summary

  • Run ripgrep once per VS Code workspace folder with that folder as the process cwd.
  • Keep absolute workspace paths in rg arguments so existing result parsing and file opening continue to receive absolute paths.
  • Preserve existing include/exclude glob handling while allowing each workspace root's .gitignore rules to be applied independently.

Fixes #35.

Validation

  • git diff --check
  • Manual ripgrep fixture on Windows with rg 15.1.0: a workspace containing .gitignore with ignored/ returned only src/hit.txt and excluded ignored/hit.txt when searched with the workspace path.

Notes

  • I could not run
    pm run compile in this Codex environment because
    pm is not available on PATH here. The change is limited to src/services/SearchService.ts.
  • AI-assisted with Codex; reviewed and tested before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Ignore the .gitignore files to be searched in

1 participant